package main

import (
	"net"
	"net/rpc"
)

type Args struct {
	Name string
}

type Hello int

func (this *Hello) Hello(args *Args, result *string) error {
	*result = "Hello " + args.Name + "!"
	return nil
}

func main() {
	server := rpc.NewServer()
	server.Register(new(Hello))
	listener, _ := net.Listen("tcp", ":1234")
	server.Accept(listener)
}
